<html>
<head>
<title>Main.java</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
.ln { color: rgb(0,0,0); font-weight: normal; font-style: normal; }
.s0 { color: rgb(0,0,128); font-weight: bold; }
.s1 { }
.s2 { color: rgb(128,128,128); font-style: italic; }
.s3 { color: rgb(0,0,255); }
.s4 { color: rgb(0,128,0); font-weight: bold; }
</style>
</head>
<BODY BGCOLOR="#ffffff">
<TABLE CELLSPACING=0 CELLPADDING=5 COLS=1 WIDTH="100%" BGCOLOR="#C0C0C0" >
<TR><TD><CENTER>
<FONT FACE="Arial, Helvetica" COLOR="#000000">
Main.java</FONT>
</center></TD></TR></TABLE>
<pre>

<a name="l1"><span class="s0">package </span><span class="s1">zadanie3; 
<a name="l2"> 
<a name="l3"></span><span class="s2">/** 
<a name="l4"> * Author: Daniel Michalski 
<a name="l5"> * Date: 28.02.13 
<a name="l6"> */</span><span class="s1"> 
<a name="l7"> 
<a name="l8"></span><span class="s0">public class </span><span class="s1">Main { 
<a name="l9">    </span><span class="s0">public static void </span><span class="s1">main(String[] args) { 
<a name="l10">        </span><span class="s0">int</span><span class="s1">[][][] obraz = </span><span class="s0">new int</span><span class="s1">[</span><span class="s3">2</span><span class="s1">][</span><span class="s3">2</span><span class="s1">][</span><span class="s3">3</span><span class="s1">]; 
<a name="l11"> 
<a name="l12">        obraz[</span><span class="s3">0</span><span class="s1">][</span><span class="s3">0</span><span class="s1">][</span><span class="s3">0</span><span class="s1">] = </span><span class="s3">255</span><span class="s1">; 
<a name="l13">        obraz[</span><span class="s3">0</span><span class="s1">][</span><span class="s3">0</span><span class="s1">][</span><span class="s3">1</span><span class="s1">] = </span><span class="s3">0</span><span class="s1">; 
<a name="l14">        obraz[</span><span class="s3">0</span><span class="s1">][</span><span class="s3">0</span><span class="s1">][</span><span class="s3">2</span><span class="s1">] = </span><span class="s3">0</span><span class="s1">; 
<a name="l15"> 
<a name="l16">        obraz[</span><span class="s3">1</span><span class="s1">][</span><span class="s3">0</span><span class="s1">][</span><span class="s3">0</span><span class="s1">] = </span><span class="s3">255</span><span class="s1">; 
<a name="l17">        obraz[</span><span class="s3">1</span><span class="s1">][</span><span class="s3">0</span><span class="s1">][</span><span class="s3">1</span><span class="s1">] = </span><span class="s3">255</span><span class="s1">; 
<a name="l18">        obraz[</span><span class="s3">1</span><span class="s1">][</span><span class="s3">0</span><span class="s1">][</span><span class="s3">2</span><span class="s1">] = </span><span class="s3">255</span><span class="s1">; 
<a name="l19"> 
<a name="l20">        obraz[</span><span class="s3">0</span><span class="s1">][</span><span class="s3">1</span><span class="s1">][</span><span class="s3">0</span><span class="s1">] = </span><span class="s3">220</span><span class="s1">; 
<a name="l21">        obraz[</span><span class="s3">0</span><span class="s1">][</span><span class="s3">1</span><span class="s1">][</span><span class="s3">1</span><span class="s1">] = </span><span class="s3">220</span><span class="s1">; 
<a name="l22">        obraz[</span><span class="s3">0</span><span class="s1">][</span><span class="s3">1</span><span class="s1">][</span><span class="s3">2</span><span class="s1">] = </span><span class="s3">220</span><span class="s1">; 
<a name="l23"> 
<a name="l24">        obraz[</span><span class="s3">1</span><span class="s1">][</span><span class="s3">1</span><span class="s1">][</span><span class="s3">0</span><span class="s1">] = </span><span class="s3">54</span><span class="s1">; 
<a name="l25">        obraz[</span><span class="s3">1</span><span class="s1">][</span><span class="s3">1</span><span class="s1">][</span><span class="s3">1</span><span class="s1">] = </span><span class="s3">54</span><span class="s1">; 
<a name="l26">        obraz[</span><span class="s3">1</span><span class="s1">][</span><span class="s3">1</span><span class="s1">][</span><span class="s3">2</span><span class="s1">] = </span><span class="s3">54</span><span class="s1">; 
<a name="l27"> 
<a name="l28">        <a href="LicznikDanegoKoloru.java.html">LicznikDanegoKoloru</a> licznik = </span><span class="s0">new <a href="LicznikDanegoKoloru.java.html">LicznikDanegoKoloru</a></span><span class="s1">(obraz); 
<a name="l29"> 
<a name="l30">        </span><span class="s0">int </span><span class="s1">ileCzerw = licznik.IloscPikseliCzerwonych(); 
<a name="l31">        System.out.println(</span><span class="s4">&quot;Licba Pixeli czerwonych: &quot; </span><span class="s1">+ ileCzerw); 
<a name="l32"> 
<a name="l33">        </span><span class="s0">int </span><span class="s1">ileSzarych = licznik.IloscPikseliSzarych(); 
<a name="l34">        System.out.println(</span><span class="s4">&quot;Licba Pixeli szarych: &quot; </span><span class="s1">+ ileSzarych); 
<a name="l35">    } 
<a name="l36">} 
<a name="l37"> 
<a name="l38"></span><span class="s2">// Color color = new Color(0, 0, 0);</span><span class="s1"> 
<a name="l39"></span><span class="s2">// obraz[0][0][0] = 255;    R</span><span class="s1"> 
<a name="l40"></span><span class="s2">// obraz[0][0][1] = 0;      G</span><span class="s1"> 
<a name="l41"></span><span class="s2">// obraz[0][0][2] = 0;      B</span><span class="s1"> 
<a name="l42"></span></pre>
</body>
</html>